import java.util.Optional;

/**
 * 通用缓存接口
 * @author Kewen-Du
 * @date 2022/10/13
 */
public interface Cache<K, V> {
    boolean put(K key, V value);
    Optional<V> get(K key);
    int size();
    boolean isEmpty();
    void clear();
}
